# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=py3-rsa
_pkgname=rsa
pkgver=4.8
pkgrel=0
pkgdesc="Pure-Python3 RSA implementation"
url="https://stuvel.eu/rsa"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-asn1"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-mock py3-mypy"
source="https://files.pythonhosted.org/packages/source/r/rsa/rsa-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # no tests in pypi tarball

replaces="py-rsa" # Backwards compatibility
provides="py-rsa=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
9dd030eb64aefe62aeefca3e8dbf90a363ef2220409a60911b6f3668dd8f36bd03ee40ea243fe8db98776e654131bfa301b781d4fc50e34f2aafd6d47165b6ba  rsa-4.8.tar.gz
"
